package com.nobody.facepk.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.nobody.facepk.model.Account;
import com.nobody.facepk.model.User;
import com.trg.dao.hibernate.GeneralDAO;
import com.trg.search.Search;

@Component
public class AccountDao {
	private GeneralDAO generalDao;
	
	public Account findAccount(String account) {
		Search search = new Search(Account.class);
		search.addFilterEqual("account", account);
		Account acc = (Account)this.generalDao.searchUnique(search);
		return acc;
	}
	
	
	
	@Autowired
	public void setGeneralDao(GeneralDAO generalDao) {
		this.generalDao = generalDao;
	}
	
}
